package leetCode;

/**
 * @author hanj.cn@outlook.com
 */
public class TwoSum {

    public static void main(String[] args) {

        int[] nums = {3, 2, 3};
        int target = 6;
        for (int i = 0; i < nums.length; i++) {
            for (int j = 0; j < nums.length - (i + 1); j++) {
                int sum = nums[i] + nums[i + j + 1];
                if (sum == target) {
                    System.out.printf("[%d,%d]", i, i + j + 1);
                }
            }
        }
    }

}
